﻿@model PagedList.IPagedList<InnoWeb.CEND.UI.MVC.Models.Reports>

<div class="News ortala">
    <h1>@ViewBag.ReportMotto</h1>
    @if (this.Request.Cookies.AllKeys.Contains("_culture"))
    {
        if (this.Request.Cookies["_culture"].Value == "tr-TR")
        {
        <p>@ViewBag.MottoReportsTR</p>    
        }
        else
        {
        <p>@ViewBag.MottoReports</p>
        }
    }
    else
    {
        if (UICulture == "tr-TR")
        {
        <p>@ViewBag.MottoReportsTR</p>    
        }
        else
        {
        <p>@ViewBag.MottoReports</p>
        }
    }
</div>

<div class="News_Yuz">
    <div class="Slider ortala">
        <ul>
            @foreach (var item in Model)
            {
                <li>
                    <a href="@Url.Action("ReportDetail", "Home", new { reportId = item.Id })">
                        <img src="~/Images/Base/testResim.png" alt="resim" />
                        <div class="Sag">
                            <div class="baslik">
                                @*@Html.DisplayFor(modelItem => item.Name)*@
                                @if (this.Request.Cookies.AllKeys.Contains("_culture"))
                                {
                                    if (this.Request.Cookies["_culture"].Value == "tr-TR")
                                    {
                                    <b>@item.NameTR</b>    
                                    }
                                    else
                                    {
                                    <b>@item.Name</b>
                                    }
                                }
                                else
                                {
                                    if (UICulture == "tr-TR")
                                    {
                                    <b>@item.NameTR</b>    
                                    }
                                    else
                                    {
                                    <b>@item.Name</b>
                                    }
                                }
                            </div>
                            <div class="icerik">
                                @*@Html.DisplayFor(modelItem => item.Text)*@
                                @if (this.Request.Cookies.AllKeys.Contains("_culture"))
                                {
                                    if (this.Request.Cookies["_culture"].Value == "tr-TR")
                                    {
                                    <p>@item.ShortDescriptionTR</p>   
                                    }
                                    else
                                    {
                                    <p>@item.ShortDescription</p>
                                    }
                                }
                                else
                                {
                                    if (UICulture == "tr-TR")
                                    {
                                    <p>@item.ShortDescriptionTR</p>  
                                    }
                                    else
                                    {
                                    <p>@item.ShortDescription</p>
                                    }
                                }
                            </div>
                        </div>
                    </a>
                </li>
            }
        </ul>
        <div class="Sayfalama">
            Sayfa @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber)
            - @Model.PageCount

            @for (int i = 1; i <= Model.PageCount; i++)
            {
                @Html.ActionLink(i.ToString(), "Photos", new { page = i, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter })
                @Html.Raw(" ");
            }

            @if (Model.HasPreviousPage)
            {
                @Html.ActionLink("<<", "Photos", new { page = 1, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter })
                @Html.Raw(" ");
                @Html.ActionLink("< Önceki", "Photos", new { page = Model.PageNumber - 1, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter })
            }
            else
            {
                @:<<
                @Html.Raw(" ");
                @:< Önceki
    }

            @if (Model.HasNextPage)
            {
                @Html.ActionLink("Sonraki >", "Photos", new { page = Model.PageNumber + 1, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter })
                @Html.Raw(" ");
                @Html.ActionLink(">>", "Photos", new { page = Model.PageCount, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter })
            }
            else
            {
                @:Sonraki >
                @Html.Raw(" ")
                @:>>
    }
            @*@for (int i = 1; i <= Model.PageCount; i++)
        {
            @Html.ActionLink(i.ToString(), "Photos", new { page = i, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter })
            @Html.Raw(" ");
        }*@
        </div>
    </div>
</div>

